/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ac.za.cput.kleintjes.question3.srp.violates.model;

/**
 * @author Administrator
 */
public class FibonacciNumber {
    
    public void printFibonacci(int number)
    {
        String message = number+"! = ";
        int current = 1;
        int past = 0;
        int temp;
        
        if(number == 1)
            message += "0";
        else if(number == 2)
            message += "0, 1";
        
        for(int x=0; x<number; x++) {
            temp = current + past;
            
            message += ", "+temp;
            past = current;
            current = temp;
        }
        
        System.out.println(message);        
    }
}
